#include <stdio.h>
void rest(int tmp)
{
	int count = 0;
	while (tmp != 0)
	{


		if (tmp & 1 == 1)
			count++;
		tmp = tmp >> 1;
	}
	printf("%d", count);

}
int main()
{
	int n, m;
	scanf("%d %d", &n, &m);
	int tmp = n ^ m;
	rest(tmp);
	return 0;
}